package com.tuling.service;

import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class UserService {
    @Resource
    @Lazy
    private UserService userService;

//    @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
    public void test(){
        this.a();
        userService.a();

    }
//    @Transactional(propagation = Propagation.NEVER, rollbackFor = Exception.class)
    public void a(){
        System.out.println("insert into t1(name,age) values('aaaa', 10)");
    }



}
